package com.forekonw.demo3;

/**
 *数组的初始化
 * foreach   for(数据类型  名 ：数组名){  输出名 }
 */
public class ArrayDemo03 {
    public static void main(String[] args) {
        int[] array = new int[]{1,131,45,54,4,2,412,};
        String [] array1 = {"123","1333","2132","131"};
        System.out.println(array1[2]);
        for (int i = 0;i<array1.length;i++){
            System.out.println(array1[i]);
        }
        for (String str:array1) {
            System.out.println(str);
            //foreach
        }
    }
}
